package com.woniu.client;


import com.woniu.client.dto.OrderDetailsDto;
import com.woniu.client.dto.OrderDto;
import com.woniu.client.dto.StationDto;
import com.woniu.model.Result;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(name = "order-server",path = "/order")//这里填目标服务名
public interface OrderClient {

    @GetMapping("/tOrder/findById/{id}")
    @ApiOperation("根据订单id查询订单")
    Result<OrderDto> findById(@PathVariable("id") String id);

    /**
     * 根据订单编号返回订单详情
     * @param orderId
     * @return
     */
    @ApiOperation("根据订单编号返回订单详情")
    @GetMapping("/orderDetails/selectAllOrderDetailByOrderId/{orderId}")
    public Result<List<OrderDetailsDto>> selectAllOrderDetailByOrderId(
            @PathVariable("orderId")
            @ApiParam(name = "orderId",value = "订单编号")
            String orderId);

}
